home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
softwareupdate
/
system
/
amigados
/
files
/
examples.doc
< prev
next >
Wrap
Text File
|
1996-10-10
|
2KB
|
40 lines
2 FILES - EXAMPLES
Example 1
This program collects ten integer values from the user, and
saves them in a file called "HighScore.dat" on the RAM disk.
Example 2
This program will reads ten integer values from an already
existing file called "HighScore.dat" which is located on the
RAM disk. (This file was created by Example1.)
Example 3
This program simply writes two strings to a file, moves the
file cursor back some characters and then collects some
characters in the middle of the file. This example does
exactly what is explained in picture "ReadWrite.pic".
Example 4
This program will open an already existing file and update
the values in it (we simply add 50 to each value). Since we
do not want any other program to destroy our updated values
we will lock the file exclusively while we are using it.
Since we want to put an exclusive lock on an already existing
file we have to use the new "OpenFromLock()" function to open
the file once we have successfully locked it. This example
needs dos library V36 or higher.
Example 5
This example demonstrates how you can write a (very) simple
data base program. In this data base you can add names of
persons and their telephone numbers. Whenever you want you
can display the complete user list.
This example uses a "Console" window which has not been
explained yet. It is therefore a bit difficult, and if you
are unfamiliar with AmigaDOS you should skip this example for
the moment and look at it later.